import java.util.LinkedList;
import java.util.List;


public class Table {

	private List<Card> shoes= new LinkedList<Card>();
	private List<Box> box= new LinkedList<Box>();
	private int boxCount=0;
	private DealerBox dealerCard= new DealerBox();

	public DealerBox getDealerCard() {
		return dealerCard;
	}

	public int getBoxCount() {
		return boxCount;
	}
	
	public List<Box> getBox() {
		return box;
	}

	public Table(int deckCount){
		for (int i=1; i<=deckCount; i++){
			CardDeck deck= new CardDeck();
			for (int j=0; j<deck.getDeck().size(); j++) {
				shoes.add(deck.getDeck().get(j));
			}
		}
	}
	public List<Card> getShoes(){
		return shoes;
	}
	
	
	
	public void deal(int howMany) {
		boxCount=howMany;

		
		
		for (int i=0; i<=boxCount-1; i++) {
			Box cbox= new Box();
			cbox.setBoxCards(shoes.get(0));
			box.add(cbox);
			shoes.remove(0);	
		}
		dealerCard.setDealerCards(shoes.get(0));
		shoes.remove(0);
		for (int i=0; i<boxCount; i++) {
			box.get(i).setBoxCards(shoes.get(0));
			shoes.remove(0);	
		}
	}
}
